
window.onload = function (){
    var info = getQuery("info");
    if (info == "noland"){
        $("infoDiv").innerHTML="请先登录"
    }
}

function login(){
    axios.get("/user/login",{
        params:{
            userName:$("userName").value,
            password:$("password").value
        }
    }).then(resp=>{
        if(resp.data == "ok"){
            location.href = "/index.html";
        }
        else{
            $("errorDiv").innerHTML = "登陆失败";
        }
    })
}